<template>
  <div class="header">
       <div class="header-left">
        <div class="iconfont back-icon">&#xe624;</div>
       </div>
       <div class="header-input"><span class="iconfont icon-sousuo"></span>输入城市/景点/游玩主题</div>
       <router-link to='/city'>
        <div class="header-rights arrow-icon">{{this.city}}<span class="iconfont icon-xiajiantou"></span></div>
       </router-link>
  </div>
</template>

<script>
import {mapState} from 'vuex'
export default {
  name: 'HomeHeader',
  computed: {
    ...mapState(['city'])
    // ...mapGetters(['doubleCity'])
  },
  props: {
    // city: String
  }
}
</script>

<style lang="stylus" scoped>
 @import '~styles/varibles.styl'
  .header
    font-size: 16px
    display: flex
    line-height: $headerHeight
    background: $bgColor
    color: #fff
    .header-left
     width :32px
     float: left
     .back-icon
      text-align: center
      font-size: 20px
    .header-input
     flex: 1
     height: 32px
     line-height: 32px
     margin-top 6px
     margin-left: 1px
     padding-left: 10px
     background #fff
     border-radius: 5px
     color #ccc
    .header-rights
     color: #fff
     min-width: 1.04rem
     padding: 0 .1rem
     float: right
     text-align center
      .arrow-icon
      margin-left :-2px
       font-size:12px
</style>
